package databaseconnector;

import java.sql.DriverManager;
import java.sql.SQLException;

import com.mysql.jdbc.Connection;



public class DBUtils {
	private static String DBLocation = "jdbc:mysql://localhost:3306/homeinfo?characterEncoding=utf8";
	private static String DBUser = "root";
	private static String DBPassword = "";

	public static Connection getConnection() {
		try {
			Class.forName("com.mysql.jdbc.Driver");
			return (Connection) DriverManager.getConnection(DBLocation, DBUser, DBPassword);

		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
}
